<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>jQuery实现页面滚动时层智能浮动定位_前端开发-武方博</title>
        <style type="text/css">
            * {
                margin: 0;
                padding: 0;
            }
            
            body {
                font: 12px / 1.8 Arial;
                color: #666;
            }
            
            h1.tit-h1 {
                font-size: 38px;
                text-align: center;
                margin: 30px 0 15px;
                color: #f60;
            }
            
            .go-back {
                text-align: center;
                border-top: 1px dashed #ccc;
                padding: 10px;
                margin-top: 20px;
                font-size: 40px;
            }
            
            .wrap {
                border: 1px dashed #ccc;
                background: #f8f8f8;
                padding: 20px;
            }
            
            .demo {
                height: 1500px;
            }
        </style>
        <script type="text/javascript" src="http://www.wufangbo.com/demo/jquery-1.4.4.min.js">
        </script>
        <script type="text/javascript" src="js/floatElement.js">
        </script>
    </head>
    <body>
        <h1 class="tit-h1">jQuery实现页面滚动时层智能浮动定位_前端开发-武方博</h1>
        <div class="wrap">
            <div class="demo" style="position:relative;border:red solid 2px;">
                <div class="float" id="float" style="position:absolute;border:blue solid 2px;top:10px;left:20px;">
                    哥不想动啦
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $("#float").smartFloat();
        </script>
        <script type="text/javascript">
            //$("#float").capacityFixed();
        </script>
    </body>
</html>
